<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        [v-cloak] {
            display: none;
        }
    </style>
</head>


<body>
<div id="main">

       <h1>{{msh}}</h1>
       <!--v-on的情况去绑定事件，@也可以取代-->
       <input type ="button" value="點擊" v-on:click="show()">
       <input type ="button" value="鼠标移动" v-on:mouseover="show()">
       <input type ="button" value="键盘敲击" @mouseover="show">
</div>



<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    var vm = new Vue({
        el: '#main',
        data: {
            msg: 'Hello Vue'
        },

        methods:{

            show (){
                console.log('222')
            }
        }

    })
</script>

</body>

</html>